package dome1;

public class Test1 {
    public static void test1(Animal animal){
        animal.eat();
    }
    public static void test2(IFlying iFlying){
        iFlying.fly();
    }
    public static void test3(ISwimming iSwimming){
        iSwimming.swim();
    }
    public static void test4(IRunning iRunning){
       iRunning.run();
    }
    public static void main(String[] args) {
      Dog dog = new Dog("小狗" ,1) ;
      Bird bird = new Bird("小鸟",1) ;

      test1(dog);
      test1(bird);
        System.out.println("==========================");
        test2(bird);
        System.out.println("==========================");
        test3(dog);
        System.out.println("==========================");
        test4(dog);
        test4(bird);
        System.out.println("============================");
        test4(new Robot());
    }
}



